#pragma once
#include "Types.h"
#include "rendering/IObserverRendering.h"



namespace Boon
{
	class Transform;
	class Matrix44;

namespace Rendering
{
	class SceneNodeProperties;
	class Scene;

	class ISceneNode
	{
	public:
		virtual void								Init( Renderer& renderer ) = 0;
		virtual const SceneNodeProperties* const	Get() const = 0;
		virtual void								SetTransform( const Matrix44& toWorld, const Matrix44& fromWorld ) = 0;
		virtual bool								IsVisible( Scene* scene ) const = 0;
		virtual bool								AddChild( const ISceneNodeStrong& child ) = 0;
		virtual ISceneNodeStrong					RemoveChild( const GameObjectID& child ) = 0;

		virtual bool								Update() = 0;
		virtual bool								PreRender( Scene* scene ) = 0;
		virtual bool								Render( Scene* scene ) = 0;
		virtual bool								RenderChildren( Scene* scene ) = 0;
		virtual bool								PostRender( Scene* scene ) = 0;

		virtual uint_32								RegisterObserver( IObserverRendering*  observer ) = 0;
		virtual bool								RemoveObserver( uint_32 observerID ) = 0;

		virtual void								OnRestore() = 0;
		virtual void								OnLostDevice() = 0;

		virtual ISceneNode*							GetParent() const = 0;

		virtual ~ISceneNode(){};
	};

}
}